/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.templet.entity;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import java.util.Map;

/**
 * 模板管理Entity
 *
 * @author ZC
 * @version 2017-04-27
 */
@XmlRootElement(name = "displaynode")
public class EleTempletSource extends DataEntity<EleTempletSource>{

    private static final long serialVersionUID = 1L;
    private EleTemplet templet;        // templet_id 父类
    private String sourceType;        // source_type
    private String width;        // 宽度
    private String height;        // 高度
    private String xloc;        // X起始
    private String yloc;        // Y起始
    private String respath;        // 文件位置
    private String respath2;    // 文件位置
    private String font;    // 字体
    private String cfgfile;        // 配置文件
    private String postion;        // postion
    private String resourceId;
    private String resourceName;
    private Map<String, Object> sourceDetail;

    public EleTempletSource(){
        super();
    }

    public EleTempletSource(String id){
        super(id);
    }

    public EleTempletSource(EleTemplet templet){
        this.templet = templet;
    }

    @XmlTransient
    @Length(min = 1, max = 100, message = "templet_id长度必须介于 1 和 100 之间")
    public EleTemplet getTemplet(){
        return templet;
    }

    public void setTemplet(EleTemplet templet){
        this.templet = templet;
    }

    @XmlElement(name="type")
    @Length(min = 1, max = 255, message = "source_type长度必须介于 1 和 255 之间")
    public String getSourceType(){
        return sourceType;
    }

    public void setSourceType(String sourceType){
        this.sourceType = sourceType;
    }

    @Length(min = 0, max = 11, message = "宽度长度必须介于 0 和 11 之间")
    public String getWidth(){
        return width;
    }

    public void setWidth(String width){
        this.width = width;
    }

    @Length(min = 0, max = 11, message = "高度长度必须介于 0 和 11 之间")
    public String getHeight(){
        return height;
    }

    public void setHeight(String height){
        this.height = height;
    }

    @Length(min = 0, max = 11, message = "X起始长度必须介于 0 和 11 之间")
    public String getXloc(){
        return xloc;
    }

    public void setXloc(String xloc){
        this.xloc = xloc;
    }

    @Length(min = 0, max = 11, message = "Y起始长度必须介于 0 和 11 之间")
    public String getYloc(){
        return yloc;
    }

    public void setYloc(String yloc){
        this.yloc = yloc;
    }

    @Length(min = 0, max = 255, message = "文件位置长度必须介于 0 和 255 之间")
    public String getRespath(){
        return respath;
    }

    public void setRespath(String respath){
        this.respath = respath;
    }

    @XmlElement(name="cfgpath")
    @Length(min = 0, max = 255, message = "配置文件长度必须介于 0 和 255 之间")
    public String getCfgfile(){
        return cfgfile;
    }

    public void setCfgfile(String cfgfile){
        this.cfgfile = cfgfile;
    }

    @XmlTransient
    @Length(min = 0, max = 255, message = "postion长度必须介于 0 和 255 之间")
    public String getPostion(){
        return postion;
    }

    public void setPostion(String postion){
        this.postion = postion;
    }

    @XmlTransient
    public String getRespath2(){
        return respath2;
    }

    public void setRespath2(String respath2){
        this.respath2 = respath2;
    }

    @XmlTransient
    public String getFont(){
        return font;
    }

    public void setFont(String font){
        this.font = font;
    }
    
    @XmlTransient
	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}
	
    @XmlTransient
	public String getResourceName() {
		return resourceName;
	}

	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}

    public Map<String, Object> getSourceDetail(){
        return sourceDetail;
    }

    public void setSourceDetail(Map<String, Object> sourceDetail){
        this.sourceDetail = sourceDetail;
    }
}